<template>
  <Row type="flex">
    <Modal v-model="turnOut" title="对比" :mask-closable="false" :scrollable="false" :fullscreen="true" :footer-hide="true">
      <div style="margin:0px auto">
        <Row type="flex">
          <Col span="12">
          <marvels-viewer :data="custData" :attachMents="attachMents" :fileParam="fileParam" :isScroll="isScroll"></marvels-viewer>
          </Col>
          <Col span="12">
          <marvels-viewer :data="YDData" :attachMents="attachMents" :fileParam="fileParam" :isScroll="isScroll"></marvels-viewer>
          </Col>
        </Row>
      </div>
    </Modal>
    <Modal id="refuseModal" v-model="reasonTurnOut" title="拒绝原因"  :mask-closable="false" :footer-hide="true" width="800" ok-text="保存">
      <div>
          <Row type="flex" align="middle">
            <Input type="textarea" v-model="refuseReason" :rows="4" placeholder="请输入拒绝原因..."/>
          </Row>
          <Row type="flex" align="middle" style="margin-top:20px">
            <Col span="12" style="text-align:center"><Button type="primary" @click="cancel()">取消</Button></Col>
            <Col span="12" style="text-align:center">
            <Button type="primary"  @click="hold()">提交</Button>
            </Col>
          </Row>
      </div>
    </Modal>
    <Col span="8" order="1">
    <marvels-viewer :data="viewerData" :attachMents="attachMents" :fileParam="fileParam" :isScroll="isScroll"></marvels-viewer>
    </Col>
    <Col span="16" order="2">
    <div ref="reportForm">
      <Row style="text-align: center;">
        <h1>个人信用报告</h1>
        <h3>（2011银行版）</h3>
      </Row>
      <Row type="flex" justify="end">
        <Button type="primary" @click="compare">对比</Button>&nbsp;&nbsp;
        <!-- <Button type="primary" @click="handleSubmit">提交</Button>&nbsp;&nbsp; -->
        <Button type="primary" @click="submitScore">提交</Button>&nbsp;&nbsp;
        <Button type="primary" @click="refuse">拒绝</Button>&nbsp;&nbsp;
        <!-- <Button type="primary" @click="handleReturn">退回</Button>&nbsp;&nbsp; -->
        <Button type="primary" @click="goBack()">返回</Button>&nbsp;&nbsp;
      </Row>
      <Card>
        <Row style="text-align: center;">
          <h2>个人基本信息</h2>
        </Row>
        <br>
        <Form ref="intBankBasicForm" :model="intBankBasicForm" :label-width="100" inline>
          <FormItem label="报告编号" prop="">
            <Input v-model="intBankBasicForm.serialNumber"></Input>
          </FormItem>
          <FormItem label="查询请求时间" prop="">
            <Date-picker type="date" v-model="intBankBasicForm.requestDate"></Date-picker>

          </FormItem>
          <FormItem label="报告时间" prop="">
            <Date-picker type="date" v-model="intBankBasicForm.respondDate"></Date-picker>
          </FormItem>
          <Button type="primary" @click="saveIntBankBasic">保存</Button>
          <Table :columns="columns" :data="intBankBasicList"></Table>
          <br>
          <Row style="text-align: center;">
            <h3>身份信息</h3>
          </Row>
          <br>
          <FormItem label="性别" prop="">
            <Input v-model="intBankBasicForm.applicantSex"></Input>
          </FormItem>
          <FormItem label="出生日期" prop="">
            <Date-picker type="date" v-model="intBankBasicForm.applicantBirthDate"></Date-picker>
          </FormItem>
          <FormItem label="婚姻状况" prop="">
            <Input v-model="intBankBasicForm.maritalStatus"></Input>
          </FormItem>
          <FormItem label="手机号码" prop="">
            <Input v-model="intBankBasicForm.cellphnoneNbr"></Input>
          </FormItem>
          <FormItem label="单位电话" prop="">
            <Input v-model="intBankBasicForm.companyTel"></Input>
          </FormItem>
          <FormItem label="住宅电话" prop="">
            <Input v-model="intBankBasicForm.residenceTel"></Input>
          </FormItem>
          <FormItem label="学历" prop="">
            <Input v-model="intBankBasicForm.eductionLevelId"></Input>
          </FormItem>
          <FormItem label="学位" prop="">
            <Input v-model="intBankBasicForm.educationBackground"></Input>
          </FormItem>
          <FormItem label="通讯地址" prop="">
            <Input v-model="intBankBasicForm.mailingAddress"></Input>
          </FormItem>
          <FormItem label="户籍地址" prop="">
            <Input v-model="intBankBasicForm.applicantHukoAddr"></Input>
          </FormItem>
          <Row style="text-align: center;">
            <h3>配偶信息</h3>
          </Row>
          <br>
          <FormItem label="姓名" prop="">
            <Input v-model="intBankBasicForm.spouseName"></Input>
          </FormItem>
          <FormItem label="证件类型" prop="">
            <Input v-model="intBankBasicForm.spouseApplicantIdType"></Input>
          </FormItem>
          <FormItem label="证件号码" prop="">
            <Input v-model="intBankBasicForm.spouseIdNbr"></Input>
          </FormItem>
          <FormItem label="联系电话" prop="">
            <Input v-model="intBankBasicForm.spouseTel"></Input>
          </FormItem>
          <FormItem label="工作单位" prop="">
            <Input v-model="intBankBasicForm.spouseCompanyName"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Card>
        <Row style="text-align: center;">
          <h2>居住信息</h2>
          <Button type="primary" style="float:right" @click="saveIntBankDwellmessage">保存</Button>
        </Row>
        <Row>
          <Table style="margin-left:35px;margin-top:50px;" :columns="columns1" :data="intBankDwellmessageList"></Table>
        </Row>
        <Button type="primary" style="float:flet" @click="newRowIntBankDwellmessage" icon="md-add"></Button>
      </Card>
      <br>
      <Card>
        <Row style="text-align: center;">
          <h2>职业信息</h2>
          <Button type="primary" style="float:right" @click="saveIntBankPositionmesage">保存</Button>
        </Row>
        <Row>
          <Table style="margin-left:35px;margin-top:50px;" :columns="columns2" :data="intBankPositionmesageList"></Table>
        </Row>
        <Button type="primary" style="float:flet" @click="newRowIntBankPositionmesage" icon="md-add"></Button>
      </Card>
      <br>
      <Row style="text-align: center;">
        <h2>信息概要</h2>
      </Row>
      <Card>
        <Form ref="intBankCredittipsForm" :model="intBankCredittipsForm" :label-width="100" inline>
          <Row style="text-align: center;">
            <h2>（一）信用提示</h2>
            <Button type="primary" style="float:right" @click="saveIntBankCredittips">保存</Button>
          </Row>
          <FormItem label="住房贷款笔数" prop="">
            <Input v-model="intBankCredittipsForm.lodgingCount"></Input>
          </FormItem>
          <FormItem label="其他贷款笔数" prop="">
            <Input v-model="intBankCredittipsForm.elseCount"></Input>
          </FormItem>
          <FormItem label="首笔贷款发放月份" prop="">
            <Date-picker type="date" v-model="intBankCredittipsForm.firstMonth"></Date-picker>
          </FormItem>
          <FormItem label="贷记卡账户数" prop="">
            <Input v-model="intBankCredittipsForm.creditCount"></Input>
          </FormItem>
          <FormItem label="首张贷记卡发卡月份" prop="">
            <Date-picker type="date" v-model="intBankCredittipsForm.firstCreditMonth"></Date-picker>
          </FormItem>
          <FormItem label="准贷记卡账户数" prop="">
            <Input v-model="intBankCredittipsForm.quasiCreditCount"></Input>
          </FormItem>
          <FormItem label="首张准贷记卡发卡月份" prop="">
            <Date-picker type="date" v-model="intBankCredittipsForm.quasiCreditMonth"></Date-picker>
          </FormItem>
          <FormItem label="本人声明数目" prop="">
            <Input v-model="intBankCredittipsForm.statementCount"></Input>
          </FormItem>
          <FormItem label="异议标注数目" prop="">
            <Input v-model="intBankCredittipsForm.objectionCount"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Row style="text-align: center;">
        <h2>（二）授信及负债信息概要</h2>
      </Row>
      <Card>
        <Form ref="intBankNotCredittipsForm" :model="intBankNotCredittipsForm" :label-width="100" inline>
          <Row style="text-align: center;">
            <h2>未结清贷款信息汇总</h2>
            <Button type="primary" style="float:right" @click="saveIntBankNotCredittips">保存</Button>
          </Row>
          <FormItem label="贷款法人机构数" prop="">
            <Input v-model="intBankNotCredittipsForm.legalpersonCount"></Input>
          </FormItem>
          <FormItem label="贷款机构数" prop="">
            <Input v-model="intBankNotCredittipsForm.organizationCount"></Input>
          </FormItem>
          <FormItem label="笔数" prop="">
            <Input v-model="intBankNotCredittipsForm.count"></Input>
          </FormItem>
          <FormItem label="合同总额" prop="">
            <Input v-model="intBankNotCredittipsForm.bargainRental"></Input>
          </FormItem>
          <FormItem label="余额" prop="">
            <Input v-model="intBankNotCredittipsForm.bargainBalance"></Input>
          </FormItem>
          <FormItem label="最近6个月平均应还款" prop="">
            <Input v-model="intBankNotCredittipsForm.averageRefund"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Card>
        <Form ref="intBankNotPinshouseholdsForm" :model="intBankNotPinshouseholdsForm" :label-width="100" inline>
          <Row style="text-align: center;">
            <h2>未销户贷记卡信息汇总</h2>
            <Button type="primary" style="float:right" @click="saveIntBankNotPinshouseholds">保存</Button>
          </Row>
          <FormItem label="发卡法人机构数" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.legalPersonCount"></Input>
          </FormItem>
          <FormItem label="发卡机构数" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.organizationCount"></Input>
          </FormItem>
          <FormItem label="帐户数" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.accountCount"></Input>
          </FormItem>
          <FormItem label="授信总额" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.creditExtensionRental"></Input>
          </FormItem>
          <FormItem label="单家行最高授信额" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.highest"></Input>
          </FormItem>
          <FormItem label="单家行最低授信额" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.minimum"></Input>
          </FormItem>
          <FormItem label="已用额度" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.beenUsed"></Input>
          </FormItem>
          <FormItem label="最近6个月平均使用额度" prop="">
            <Input v-model="intBankNotPinshouseholdsForm.averageBalance"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Card>
        <Form ref="intBankNotQuasiCreditForm" :model="intBankNotQuasiCreditForm" :label-width="100" inline>
          <Row style="text-align: center;">
            <h2>未销户准贷记卡信息汇总</h2>
            <Button type="primary" style="float:right" @click="saveIntBankNotQuasiCredit">保存</Button>
          </Row>
          <FormItem label="发卡法人机构数" prop="">
            <Input v-model="intBankNotQuasiCreditForm.legalPersonCount"></Input>
          </FormItem>
          <FormItem label="发卡机构数" prop="">
            <Input v-model="intBankNotQuasiCreditForm.organizationCount"></Input>
          </FormItem>
          <FormItem label="帐户数" prop="">
            <Input v-model="intBankNotQuasiCreditForm.accountCount"></Input>
          </FormItem>
          <FormItem label="授信总额" prop="">
            <Input v-model="intBankNotQuasiCreditForm.creditExtensionRental"></Input>
          </FormItem>
          <FormItem label="单家行最高授信额" prop="">
            <Input v-model="intBankNotQuasiCreditForm.highest"></Input>
          </FormItem>
          <FormItem label="单家行最低授信额" prop="">
            <Input v-model="intBankNotQuasiCreditForm.minimum"></Input>
          </FormItem>
          <FormItem label="透支余度" prop="">
            <Input v-model="intBankNotQuasiCreditForm.overdraftBalance"></Input>
          </FormItem>
          <FormItem label="最近6个月平均使用额度" prop="">
            <Input v-model="intBankNotQuasiCreditForm.averageBalance"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Card>
        <Form ref="intBankGuaranteeCountForm" :model="intBankGuaranteeCountForm" :label-width="100" inline>
          <Row style="text-align: center;">
            <h2>对外担保信息汇总</h2>
            <Button type="primary" style="float:right" @click="saveIntBankGuaranteeCount">保存</Button>
          </Row>
          <FormItem label="担保笔数" prop="">
            <Input v-model="intBankGuaranteeCountForm.loanCount"></Input>
          </FormItem>
          <FormItem label="担保金额" prop="">
            <Input v-model="intBankGuaranteeCountForm.loanRental"></Input>
          </FormItem>
          <FormItem label="提保本金余额" prop="">
            <Input v-model="intBankGuaranteeCountForm.sharedLines"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Row style="text-align: center;">
        <h2>信贷交易信息明细</h2>
      </Row>
      <Card>
        <Row style="text-align: center;">
          <h2 style="color:red">（一）贷款</h2>
        </Row>
        <Row v-for="(item, index) in intBankCreditPaymentJQList" :key="index">
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label v-html="index+1"></label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanDate"></DatePicker>
            </Col>
            <Col span="1">
            <label>机构</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.loanOrganization"></Input>
            </Col>
            <Col span="1">
            <label>发放的</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanRental"></Input>
            </Col>
            <Col span="2">
            <label>元（人民币）</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanNature"></Input>
            </Col>
            <Col span="2">
            <label>，业务号</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.mark"></Input>
            </Col>
          </Row>
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.markType"></Input>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="1">
            <Input :value.sync="item.value" v-model="item.deadline"></Input>
            </Col>
            <Col span="1">
            <label>期</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.refundType"></Input>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanExpire"></DatePicker>
            </Col>
            <Col span="2">
            <label>到期，已于</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.endExpire"></DatePicker>
            </Col>
            <Col span="2">
            <Input v-model="item.loanType"></Input>
            </Col>
            <Col span="2">
            <Button type="primary" style="float:right" @click="saveIntBankCreditPaymentJQ(item,index)">保存</Button>
            <Button type="primary" style="float:right" v-if="!item.loanId" @click="deleteIntBankCreditPaymentJQ(item,index)">删除</Button>
            </Col>
          </Row>
          <br>
        </Row>
        <Row v-for="(item, index) in intBankCreditPaymentNJQList" :key="intBankCreditPaymentNJQList.length+index">
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label v-html="intBankCreditPaymentJQList.length+index+1"></label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanDate"></DatePicker>
            </Col>
            <Col span="1">
            <label>机构</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.loanOrganization"></Input>
            </Col>
            <Col span="1">
            <label>发放的</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanRental"></Input>
            </Col>
            <Col span="2">
            <label>元（人民币）</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanNature"></Input>
            </Col>
            <Col span="2">
            <label>，业务号</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.mark"></Input>
            </Col>
          </Row>
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.markType"></Input>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="1">
            <Input :value.sync="item.value" v-model="item.deadline"></Input>
            </Col>
            <Col span="1">
            <label>期</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.refundType"></Input>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanExpire"></DatePicker>
            </Col>
            <Col span="2">
            <label>到期，截至</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.endExpire"></DatePicker>
            </Col>
            <Col span="2">
            <Input v-model="item.loanType"></Input>
            </Col>
            <Col span="2">
            <Button type="primary" style="float:right" @click="saveIntBankCreditPaymentJQ(item,index)">保存</Button>
            <Button type="primary" style="float:right" v-if="!item.loanId" @click="deleteIntBankCreditPaymentJQ(item,index)">删除</Button>
            </Col>
          </Row>
          <br>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>帐户状态</label>
            </Col>
            <Col span="4">
            <Input v-model="item.accountType"></Input>
            </Col>
            <Col span="4">
            <label>五级分类</label>
            </Col>
            <Col span="4">
            <Input v-model="item.classify"></Input>
            </Col>
            <Col span="4">
            <label>本金余额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.haveUsedLimit"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>剩余还款期数</label>
            </Col>
            <Col span="4">
            <Input v-model="item.restPeriods"></Input>
            </Input>
            </Col>
            <Col span="4">
            <label>本月应还款</label>
            </Col>
            <Col span="4">
            <Input v-model="item.shouldReimbursement"></Input>
            </Col>
            <Col span="4">
            <label>应还款日</label>
            </Col>
            <Col span="4">
            <DatePicker type="date" v-model="item.reimbursement"></DatePicker>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>本月实还款</label>
            </Col>
            <Col span="4">
            <Input v-model="item.solidRepayment"></Input>
            </Input>
            </Col>
            <Col span="4">
            <label>最近一次还款日期</label>
            </Col>
            <Col span="4">
            <DatePicker type="date" v-model="item.recentRepaymentDate"></DatePicker>
            </Col>
            <Col span="4">
            <label>当前逾期期数</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overduePeriods"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>当前逾期金额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdueAmount"></Input>
            </Input>
            </Col>
            <Col span="4">
            <label>逾期31-60天未还本金</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdue60Principal"></Input>
            </Col>
            <Col span="4">
            <label>逾期61-90天未还本金</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdue90Principal"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>逾期91-180天未还本金</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdue180Principal"></Input>
            </Col>
            <Col span="4">
            <label>逾期180天以上未还本金</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdue180morePrincipal"></Input>
            </Col>
            <Col span="8"></Col>
          </Row>
          <Row style="text-align: center;">
            <h3>还款记录</h3>
          </Row>
          <Row>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore1month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore2month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore3month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore4month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore5month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore6month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore7month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore8month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore9month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore10month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore11month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore12month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore13month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore14month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore15month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore16month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore17month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore18month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore19month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore20month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore21month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore22month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore23month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore24month"></Input>
            </Col>
          </Row>
          <br>
        </Row>
        <Button type="primary" style="float:flet" @click="newRowIntBankCreditPaymentNJQ" icon="md-add"></Button>
      </Card>
      <br>
      </Card>
      <br>
      <Card>
        <Row style="text-align: center;">
          <h2 style="color:red">（二）贷记卡</h2>
        </Row>
        <Row v-for="(item, index) in intBankCreditCardXhRecordList" :key="index">
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label v-html="index+1"></label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanDate"></DatePicker>
            </Col>
            <Col span="1">
            <label>机构</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.loanOrganization"></Input>
            </Col>
            <Col span="1">
            <label>发放的</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanType"></Input>
            </Col>
            <Col span="2">
            <label>，业务号</label>
            </Col>
            <Col span="4">
            <Input :value.sync="item.value" v-model="item.mark"></Input>
            </Col>
            <Col span="2">
            <label>，授信额度</label>
            </Col>
            <Col span="3">
            <Input :value.sync="item.value" v-model="item.loanRental"></Input>
            </Col>

          </Row>
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label>， </label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanNature"></Input>
            </Col>
            <Col span="2">
            <label>，截至</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanExpire"></DatePicker>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.accountType"></Input>
            </Col>
            <Col span="11"></Col>
            <Col span="2">
            <Button type="primary" style="float:right" @click="saveIntBankCreditCardXhRecord(item, index)">保存</Button>
            <Button type="primary" style="float:right" v-if="!item.loanId" @click="deleteIntBankCreditCardXhRecord(item, index)">删除</Button>
            </Col>
          </Row>
          <br>
        </Row>
        <Row v-for="(item, index) in intBankCreditCardNXhRecordList" :key="intBankCreditCardXhRecordList.length+index">
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label v-html="intBankCreditCardXhRecordList.length+index+1"></label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanDate"></DatePicker>
            </Col>
            <Col span="1">
            <label>机构</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.loanOrganization"></Input>
            </Col>
            <Col span="1">
            <label>发放的</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanType"></Input>
            </Col>
            <Col span="2">
            <label>，业务号</label>
            </Col>
            <Col span="4">
            <Input :value.sync="item.value" v-model="item.mark"></Input>
            </Col>
            <Col span="2">
            <label>，授信额度</label>
            </Col>
            <Col span="3">
            <Input :value.sync="item.value" v-model="item.loanRental"></Input>
            </Col>
          </Row>
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label>， </label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanNature"></Input>
            </Col>
            <Col span="2">
            <label>，截至</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanExpire"></DatePicker>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.accountType"></Input>
            </Col>
            <Col span="11"></Col>
            <Col span="2">
            <Button type="primary" style="float:right" @click="saveIntBankCreditCardXhRecord(item, index)">保存</Button>
            <Button type="primary" style="float:right" v-if="!item.loanId" @click="deleteIntBankCreditCardXhRecord(item, index)">删除</Button>
            </Col>
          </Row>
          <br>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>帐户状态</label>
            </Col>
            <Col span="4">
            <Input v-model="item.accountTypeTwo"></Input>
            </Col>
            <Col span="4">
            <label>已用额度</label>
            </Col>
            <Col span="4">
            <Input v-model="item.haveUsedLimit"></Input>
            </Col>
            <Col span="4">
            <label>最近6个月平均使用额度</label>
            </Col>
            <Col span="4">
            <Input v-model="item.averageUsageLimit"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>最大使用额度</label>
            </Col>
            <Col span="4">
            <Input v-model="item.theBiggestLimit"></Input>
            </Input>
            </Col>
            <Col span="4">
            <label>本月应还款</label>
            </Col>
            <Col span="4">
            <Input v-model="item.shouldReimbursement"></Input>
            </Col>
            <Col span="4">
            <label>帐单日</label>
            </Col>
            <Col span="4">
            <DatePicker type="date" v-model="item.reimbursement"></DatePicker>
            </Col>
          </Row>

          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>本月实还款</label>
            </Col>
            <Col span="4">
            <Input v-model="item.solidRepayment"></Input>
            </Input>
            </Col>
            <Col span="4">
            <label>最近一次还款日期</label>
            </Col>
            <Col span="4">
            <DatePicker type="date" v-model="item.recentRepaymentDate"></DatePicker>
            </Col>
            <Col span="4">
            <label>当前逾期期数</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overduePeriods"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>当前逾期金额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdueAmount"></Input>
            </Input>
            </Col>
            <Col span="16"></Col>
          </Row>
          <Row style="text-align: center;">
            <h4>还款记录</h4>
          </Row>
          <Row>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore24month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore23month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore22month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore21month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore20month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore19month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore18month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore17month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore16month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore15month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore14month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore13month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore12month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore11month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore10month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore9month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore8month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore7month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore6month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore5month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore4month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore3month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore2month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore1month"></Input>
            </Col>
          </Row>
          <br>
        </Row>
        <Button type="primary" style="float:flet" @click="newRowIntBankCreditCardNXhRecord" icon="md-add"></Button>
      </Card>
      <br>
      <Card>
        <Row style="text-align: center;">
          <h2 style="color:red">（三）准贷记卡</h2>
        </Row>
        <Row v-for="(item, index) in intBankStandardCreditCardsList" :key="index">
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label v-html="index+1"></label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanDate"></DatePicker>
            </Col>
            <Col span="1">
            <label>机构</label>
            </Col>
            <Col span="5">
            <Input :value.sync="item.value" v-model="item.loanOrganization"></Input>
            </Col>
            <Col span="1">
            <label>发放的</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanType"></Input>
            </Col>
            <Col span="2">
            <label>，业务号</label>
            </Col>
            <Col span="4">
            <Input :value.sync="item.value" v-model="item.mark"></Input>
            </Col>
            <Col span="2">
            <label>，授信额度</label>
            </Col>
            <Col span="3">
            <Input :value.sync="item.value" v-model="item.loanRental"></Input>
            </Col>
          </Row>
          <Row type="flex" justify="center" align="middle">
            <Col span="1">
            <label>， </label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.loanNature"></Input>
            </Col>
            <Col span="2">
            <label>，截至</label>
            </Col>
            <Col span="3">
            <DatePicker type="date" :value.sync="item.value" v-model="item.loanExpire"></DatePicker>
            </Col>
            <Col span="1">
            <label>，</label>
            </Col>
            <Col span="2">
            <Input :value.sync="item.value" v-model="item.accountType"></Input>
            </Col>
            <Col span="11"></Col>
            <Col span="2">
            <Button type="primary" style="float:right" @click="saveIntBankStandardCreditCard(item, index)">保存</Button>
            <Button type="primary" style="float:right" v-if="!item.loanId" @click="deleteIntBankStandardCreditCard(item, index)">删除</Button>
            </Col>
          </Row>
          <br>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>帐户状态</label>
            </Col>
            <Col span="4">
            <Input v-model="item.accountTypeTwo"></Input>
            </Col>
            <Col span="4">
            <label>透支余额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.haveUsedLimit"></Input>
            </Col>
            <Col span="4">
            <label>最近6个月平均透支余额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.averageUsageLimit"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>最大透支余额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.shouldReimbursement"></Input>
            </Input>
            </Col>
            <Col span="4">
            <label>帐单日</label>
            </Col>
            <Col span="4">
            <DatePicker type="date" v-model="item.reimbursement"></DatePicker>
            </Col>
            <Col span="4">
            <label>本月实还款</label>
            </Col>
            <Col span="4">
            <Input v-model="item.solidRepayment"></Input>
            </Col>
          </Row>
          <Row :gutter="16" type="flex" justify="center" align="middle">
            <Col span="4">
            <label>最近一次还款日期</label>
            </Col>
            <Col span="4">
            <DatePicker type="date" v-model="item.recentRepaymentDate"></DatePicker>
            </Col>
            <Col span="4">
            <label>透支180天以上未付余额</label>
            </Col>
            <Col span="4">
            <Input v-model="item.overdueAmount"></Input>
            </Col>
            <Col span="8"></Col>
          </Row>
          <br>
          <Row style="text-align: center;">
            <h4>还款记录</h4>
          </Row>
          <Row>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore24month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore23month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore22month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore21month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore20month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore19month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore18month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore17month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore16month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore15month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore14month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore13month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore12month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore11month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore10month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore9month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore8month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore7month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore6month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore5month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore4month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore3month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore2month"></Input>
            </Col>
            <Col span="1">
            <Input v-model="item.paymentHistoryBefore1month"></Input>
            </Col>
          </Row>
          <br>
        </Row>
        <Button type="primary" style="float:flet" @click="newRowIntBankStandardCreditCards" icon="md-add"></Button>
      </Card>
      <br>
      <Card>
        <Row style="text-align: center;">
          <h2 style="color:red">四 公共信息明细</h2>
        </Row>
        <Form ref="intBankEndowmentInsuranceForm" :model="intBankEndowmentInsuranceForm" :label-width="100" inline>
          <Row style="text-align: center;">
            <h3 style="">养老保险金缴存记录</h3>
            <Button type="primary" style="float:right" @click="saveIntBankEndowmentInsurance">保存</Button>
          </Row>
          <FormItem label="参保地" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.loanOrganization"></Input>
          </FormItem>
          <FormItem label="参保日期" prop="">
            <DatePicker type="date" v-model="intBankEndowmentInsuranceForm.loanDate"></DatePicker>
          </FormItem>
          <FormItem label="累计缴费月数" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.aggregate"></Input>
          </FormItem>
          <FormItem label="参加工作月份" prop="">
            <DatePicker type="date" v-model="intBankEndowmentInsuranceForm.reimbursement"></DatePicker>
          </FormItem>
          <FormItem label="缴费状态" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.payCostType"></Input>
          </FormItem>
          <FormItem label="个人缴费基数" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.overdueAmount"></Input>
          </FormItem>
          <FormItem label="本月缴费金额" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.solidRepayment"></Input>
          </FormItem>
          <FormItem label="信息更新日期" prop="">
            <DatePicker type="date" v-model="intBankEndowmentInsuranceForm.updateDate"></DatePicker>
          </FormItem>
          <FormItem label="缴费单位" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.payCostUnit"></Input>
          </FormItem>
          <FormItem label="中断或终止缴费原因" prop="">
            <Input v-model="intBankEndowmentInsuranceForm.cause"></Input>
          </FormItem>
        </Form>
      </Card>
      <br>
      <Card>
        <Row style="text-align: center;">
          <h2 style="color:red">五 查询记录</h2>
        </Row>
        <Row style="text-align: center;">
          <h3 style="">查询记录汇总</h3>
          <Button type="primary" style="float:right" @click="saveintBankQuerySummary">保存</Button>
        </Row>
        <Table :columns="columns7" :data="intBankQuerySummaryList" border></Table>
        <br>
        <Row style="text-align: center;">
          <h3 style="">查询记录</h3>
        </Row>
        <Table :columns="columns5" :data="intBankQueryDetailList"></Table>
        <Button type="primary" style="float:flet" @click="newRowIntBankQueryDetail" icon="md-add"></Button>
        <Row style="text-align: center;">
          <h3 style="">个人查询记录</h3>
        </Row>
        <Table :columns="columns6" :data="intBankBanruDetailList"></Table>
        <Button type="primary" style="float:flet" @click="newRowIntBankBanruDetail" icon="md-add"></Button>
      </Card>
    </div>
    </Col>
  </Row>
</template>

<script>
import marvelsViewer from '../../components/marvels-viewer.vue'
import attachmentTypeData from '../../components/attachment-type-data.js'

export default {
  components: {
    marvelsViewer
  },
  data () {
    return {
      baseUrl: this.$appContext.marvels_core_approve,
      $ajax: null,
      loanId: null,
      isScroll: true,
      columns: [{
        align: 'center',
        title: '被查询者姓名',
        key: 'applicantName',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.applicantName
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBasicList[params.index], 'applicantName', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '被查询者证件类型',
        key: 'applicantIdType',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.applicantIdType
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBasicList[params.index], 'applicantIdType', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '被查询者证件号码',
        key: 'applicantIdNbr',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.applicantIdNbr
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBasicList[params.index], 'applicantIdNbr', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '被查操作员',
        key: 'operateName',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.operateName
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBasicList[params.index], 'operateName', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '查询原因',
        key: 'inquiryType',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.inquiryType
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBasicList[params.index], 'inquiryType', e.target.value)
              }
            }
          })
        }.bind(this)
      }
      ],
      columns1: [{
        title: '序号',
        type: 'index',
        width: 70,
        align: 'center'
      },
      {
        align: 'center',
        title: '居住地址',
        key: 'curHomeAddress',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.curHomeAddress
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankDwellmessageList[params.index], 'curHomeAddress', e.target.value)
              }
            }
          })
        }.bind(this)
      }, {
        align: 'center',
        title: '居住状况',
        width: 150,
        key: 'homeType',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.homeType
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankDwellmessageList[params.index], 'homeType', e.target.value)
              }
            }
          })
        }.bind(this)
      }, {
        align: 'center',
        title: '信息更新日期',
        width: 180,
        key: 'curHomeStartdate',
        render: function (h, params) {
          const vm = this
          return h('DatePicker', {
            props: {
              type: 'date',
              value: params.row.curHomeStartdate ? new Date(params.row.curHomeStartdate) : ''
            },
            on: {
              'on-change' (v1, v2) {
                vm.$set(vm.tempIntBankDwellmessageList[params.index], 'curHomeStartdate', v1)
              }
            }
          })
        }.bind(this)
      }
      ],
      columns2: [{
        title: '序号',
        type: 'index',
        width: 60,
        align: 'center'
      },
      {
        align: 'center',
        title: '工作单位',
        key: 'companyName',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.companyName
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyName', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '单位地址',
        key: 'companyAddress',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.companyAddress
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyAddress', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '职业',
        key: 'companyPosition',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.companyPosition
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyPosition', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '行业',
        key: 'companyIndustry',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.companyIndustry
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyIndustry', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '职务',
        key: 'companyDuty',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.companyDuty
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyDuty', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '职称',
        key: 'companyProfessionaltitle',
        render: function (h, params) {
          const vm = this
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.companyProfessionaltitle
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyProfessionaltitle', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '进入本单位年份',
        key: 'companyRegistrationDate',
        render: function (h, params) {
          const vm = this
          return h('DatePicker', {
            props: {
              type: 'date',
              value: params.row.companyRegistrationDate ? new Date(params.row.companyRegistrationDate) : ''
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (v1, v2) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'companyRegistrationDate', v1)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '信息更新日期',
        key: 'curHomeStartdate',
        render: function (h, params) {
          const vm = this
          return h('DatePicker', {
            props: {
              type: 'date',
              value: params.row.curHomeStartdate ? new Date(params.row.curHomeStartdate) : ''
            },
            style: {
              width: 'fit-content'
            },
            on: {
              'on-change' (v1, v2) {
                vm.$set(vm.tempIntBankPositionmesageList[params.index], 'curHomeStartdate', v1)
              }
            }
          })
        }.bind(this)
      }
      ],
      columns5: [{
        title: '序号',
        type: 'index',
        width: 80,
        align: 'center'
      },
      {
        align: 'center',
        title: '查询日期',
        key: 'queryTheDate',
        width: 150,
        render: function (h, params) {
          const vm = this
          if (params.row.id) {
            return vm.renderTableSpan(h, vm.$util.formatDate(params.row.queryTheDate))
            // return h('span', {}, vm.$util.formatDate(params.row.queryTheDate));
          }
          return h('DatePicker', {
            props: {
              type: 'date',
              value: params.row.queryTheDate ? new Date(params.row.queryTheDate) : ''
            },
            on: {
              'on-change' (v1, v2) {
                vm.$set(vm.tempIntBankQueryDetailList[params.index], 'queryTheDate', v1)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '查询操作员',
        key: 'queryOperators',
        render: function (h, params) {
          const vm = this
          if (params.row.id) {
            return vm.renderTableSpan(h, params.row.queryOperators)
          }
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.queryOperators
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankQueryDetailList[params.index], 'queryOperators', e.target.value)
              }
            }
          })
        }.bind(this)

      },
      {
        align: 'center',
        title: '查询原因',
        key: 'queryReason',
        render: function (h, params) {
          const vm = this
          if (params.row.id) {
            return vm.renderTableSpan(h, params.row.queryReason)
          }
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.queryReason
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankQueryDetailList[params.index], 'queryReason', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '操作',
        key: 'action',
        width: 120,
        render: (h, params) => {
          var vm = this
          if (params.row.id) {
            return h('div', [
              h('Button', {
                props: {
                  type: 'error',
                  size: 'small'
                },
                on: {
                  click: () => {
                    // 删除
                    vm.handleDelIntBankQueryDetail(params)
                  }
                }
              }, ' 删除')
            ])
          }
          return h('div', [
            h('Button', {
              props: {
                type: 'primary',
                size: 'small'
              },
              on: {
                click: () => {
                  // 保存
                  vm.saveIntBankQueryDetail(params)
                }
              }
            }, ' 保存')
          ])
        }
      }
      ],
      columns6: [{
        title: '序号',
        type: 'index',
        width: 80,
        align: 'center'
      },
      {
        align: 'center',
        title: '查询日期',
        key: 'queryTheDate',
        width: 150,
        render: function (h, params) {
          const vm = this
          if (params.row.id) {
            return vm.renderTableSpan(h, params.row.queryTheDate)
          }
          return h('DatePicker', {
            props: {
              type: 'date',
              value: params.row.queryTheDate ? new Date(params.row.queryTheDate) : ''
            },
            on: {
              'on-change' (v1, v2) {
                vm.$set(vm.tempIntBankBanruDetailList[params.index], 'queryTheDate', v1)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '查询操作员',
        key: 'queryOperators',
        render: function (h, params) {
          const vm = this
          if (params.row.id) {
            return vm.renderTableSpan(h, params.row.queryOperators)
          }
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.queryOperators
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBanruDetailList[params.index], 'queryOperators', e.target.value)
              }
            }
          })
        }.bind(this)
      },
      {
        align: 'center',
        title: '查询原因',
        key: 'queryReason',
        render: function (h, params) {
          const vm = this
          if (params.row.id) {
            return vm.renderTableSpan(h, params.row.queryReason)
          }
          return h('Input', {
            props: {
              type: 'text',
              value: params.row.queryReason
            },
            on: {
              'on-change' (e) {
                vm.$set(vm.tempIntBankBanruDetailList[params.index], 'queryReason', e.target.value)
              }
            }
          })
        }.bind(this)
      }, {
        align: 'center',
        title: '操作',
        key: 'action',
        width: 120,
        render: (h, params) => {
          var vm = this
          if (params.row.id) {
            return h('div', [
              h('Button', {
                props: {
                  type: 'error',
                  size: 'small'
                },
                on: {
                  click: () => {
                    // 删除
                    vm.handleDelIntBankBanruDetail(params)
                  }
                }
              }, ' 删除')
            ])
          }
          return h('div', [
            h('Button', {
              props: {
                type: 'primary',
                size: 'small'
              },
              on: {
                click: () => {
                  // 保存
                  vm.saveIntBankBanruDetail(params)
                }
              }
            }, ' 保存')
          ])
        }
      }
      ],
      columns7: [{
        title: '最近1个月内的查询机构数',
        align: 'center',
        children: [{
          title: '贷款审批',
          key: 'institutionLoanCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.institutionLoanCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'institutionLoanCount', e.target.value)
                }
              }
            })
          }.bind(this)
        },
        {
          title: '信用卡审批',
          key: 'institutionCreditCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.institutionCreditCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'institutionCreditCount', e.target.value)
                }
              }
            })
          }.bind(this)
        }
        ]
      },
      {
        title: '最近1个月内的查询数',
        align: 'center',
        children: [{
          title: '贷款审批',
          key: 'loanCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.loanCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'loanCount', e.target.value)
                }
              }
            })
          }.bind(this)
        },
        {
          title: '信用卡审批',
          key: 'creditCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.creditCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'creditCount', e.target.value)
                }
              }
            })
          }.bind(this)
        },
        {
          title: '本人查询',
          key: 'banruCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.banruCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'banruCount', e.target.value)
                }
              }
            })
          }.bind(this)
        }
        ]
      },
      {
        title: '最近2年内的查询次数',
        align: 'center',
        children: [{
          title: '贷后管理',
          key: 'postLoanCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.postLoanCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'postLoanCount', e.target.value)
                }
              }
            })
          }.bind(this)
        },
        {
          title: '担保资格审查',
          key: 'assuranceCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.assuranceCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'assuranceCount', e.target.value)
                }
              }
            })
          }.bind(this)
        },
        {
          title: '特约商户实名审查',
          key: 'contributingCount',
          align: 'center',
          render: function (h, params) {
            const vm = this
            return h('Input', {
              props: {
                type: 'text',
                value: params.row.contributingCount
              },
              on: {
                'on-change' (e) {
                  vm.$set(vm.tempIntBankQuerySummaryList[params.index], 'contributingCount', e.target.value)
                }
              }
            })
          }.bind(this)
        }
        ]
      }
      ],
      viewerData: [],
      custData: [],
      YDData: [],
      reasonTurnOut: false,
      attachMents: [],
      refuseReason: '',
      fileParam: {
        url: '',
        isShow: false
      },
      turnOut: false,
      intBankBasicForm: {}, // 个人基本信息
      intBankBasicList: [], // 个人基本信息
      tempIntBankBasicList: [],
      intBankDwellmessageList: [], // 居住信息
      tempIntBankDwellmessageList: [],
      intBankPositionmesageList: [], // 职业信息
      tempIntBankPositionmesageList: [],
      intBankCredittipsForm: {}, // 信用提示
      intBankNotCredittipsForm: {}, // 未结清贷款信息汇总
      intBankNotQuasiCreditForm: {}, // 未销户准贷记卡信息汇总
      intBankNotPinshouseholdsForm: {}, // 未销户贷记卡信息汇总
      intBankGuaranteeCountForm: {}, // 对外担保信息汇总
      intBankCreditPaymentJQList: [], // 贷款
      intBankCreditPaymentNJQList: [], // 贷款
      intBankCreditCardXhRecordList: [], // 贷记卡
      intBankCreditCardNXhRecordList: [], // 贷记卡
      intBankStandardCreditCardsList: [], // 准贷记卡
      intBankEndowmentInsuranceForm: {}, // 养老保险金缴存记录
      intBankQuerySummaryList: [], // 查询记录汇总
      tempIntBankQuerySummaryList: [],
      intBankQueryDetailList: [], // 查询记录
      tempIntBankQueryDetailList: [],
      intBankBanruDetailList: [], // 个人查询记录
      tempIntBankBanruDetailList: [],
      rowData: null // 表格行对象
    }
  },
  methods: {
    // 动态表格 渲染只读span
    renderTableSpan (h, text) {
      return h('span', {}, text)
    },
    handleDelIntBankQueryDetail (rowData) {
      this.rowData = rowData
      var config = {
        title: '提示',
        content: '是否确认删除?',
        onOk: this.delIntBankQueryDetail
      }
      this.$Modal.confirm(config)
    },
    // 删除 查询记录
    delIntBankQueryDetail () {
      var vm = this
      var params = {}
      params.id = this.rowData.row.id
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/deleteQueryDetail', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        // 删除动态表格临时数据
        vm.tempIntBankQueryDetailList.splice(vm.rowData.index, 1)
        // 临时数据复制给真实数据 渲染动态表格
        vm.intBankQueryDetailList = vm.$util.cloneObject(vm.tempIntBankQueryDetailList)
      }).catch(er => {

      })
    },
    handleDelIntBankBanruDetail (rowData) {
      this.rowData = rowData
      var config = {
        title: '提示',
        content: '是否确认删除?',
        onOk: this.delIntBankBanruDetail
      }
      this.$Modal.confirm(config)
    },
    // 删除 个人查询记录
    delIntBankBanruDetail () {
      var vm = this
      var params = {}
      params.id = this.rowData.row.id
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/deleteBanruDetail', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        // 删除动态表格临时数据
        vm.tempIntBankBanruDetailList.splice(vm.rowData.index, 1)
        // 临时数据复制给真实数据 渲染动态表格
        vm.intBankBanruDetailList = vm.$util.cloneObject(vm.tempIntBankBanruDetailList)
      }).catch(er => {

      })
    },
    handleSubmit (rowData) {
      this.rowData = rowData
      var config = {
        title: '提示',
        content: '是否确认提交?',
        onOk: this.submitCreditReport
      }
      this.$Modal.confirm(config)
    },
    // 提交
    submitCreditReport () {
      var vm = this
      var url = this.baseUrl + 'approve/credit/intbank/service/submitCreditReport/' + this.loanId
      this.$ajax.post(url).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.$router.back()
      }).catch(er => {

      })
    },
    handleReturn (rowData) {
      this.rowData = rowData
      var config = {
        title: '提示',
        content: '是否确认退回?',
        onOk: this.returnCreditReport
      }
      this.$Modal.confirm(config)
    },
    // 退回
    returnCreditReport () {
      var vm = this
      var url = this.baseUrl + 'approve/credit/intbank/service/returnCreditReport/' + this.loanId
      this.$ajax.post(url).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.$router.back()
      }).catch(er => {

      })
    },
    // 保存基本信息
    saveIntBankBasic () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankBasicForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      params.applicantName = null
      params.applicantIdType = null
      params.applicantIdNbr = null
      params.operateName = null
      params.inquiryType = null
      // 动态表格临时数据复制给真实对象
      this.intBankBasicList = this.$util.cloneObject(this.tempIntBankBasicList)
      // 动态表格赋值
      if (this.intBankBasicList && this.intBankBasicList.length > 0) {
        var obj = this.intBankBasicList[0]
        params.applicantName = obj.applicantName
        params.applicantIdType = obj.applicantIdType
        params.applicantIdNbr = obj.applicantIdNbr
        params.operateName = obj.operateName
        params.inquiryType = obj.inquiryType
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankBasicList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankBasicData(data.data)
        }
      }).catch(er => {

      })
    },
    // 保存居住信息
    saveIntBankDwellmessage () {
      var vm = this
      var params = {}
      // 动态表格临时数据复制给真实对象
      this.intBankDwellmessageList = this.$util.cloneObject(this.tempIntBankDwellmessageList)
      var newList = []
      var updateList = []
      for (var i = 0; i < this.intBankDwellmessageList.length; i++) {
        if (this.intBankDwellmessageList[i].id) {
          updateList.push(this.intBankDwellmessageList[i])
        } else {
          this.intBankDwellmessageList[i].loanId = this.loanId
          this.intBankDwellmessageList[i].serialNum = this.loanId
          newList.push(this.intBankDwellmessageList[i])
        }
      }
      params.newList = newList
      params.updateList = updateList
      params.loanId = this.loanId
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankDwellmessage', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.initIntBankDwellmessageData(data.data.newList)
      }).catch(er => {

      })
    },
    // 新增行 居住信息
    newRowIntBankDwellmessage () {
      this.intBankDwellmessageList = this.$util.cloneObject(this.tempIntBankDwellmessageList)
      this.intBankDwellmessageList.push({})
      this.tempIntBankDwellmessageList.push({})
    },
    // 保存职业信息
    saveIntBankPositionmesage () {
      var vm = this
      var params = {}
      // 动态表格临时数据复制给真实对象
      this.intBankPositionmesageList = this.$util.cloneObject(this.tempIntBankPositionmesageList)
      var newList = []
      var updateList = []
      for (var i = 0; i < this.intBankPositionmesageList.length; i++) {
        if (this.intBankPositionmesageList[i].id) {
          updateList.push(this.intBankPositionmesageList[i])
        } else {
          this.intBankPositionmesageList[i].loanId = this.loanId
          this.intBankPositionmesageList[i].serialNum = this.loanId
          newList.push(this.intBankPositionmesageList[i])
        }
      }
      params.newList = newList
      params.updateList = updateList
      params.loanId = this.loanId
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankPositionmesage', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.initIntBankPositionmesageData(data.data.newList)
      }).catch(er => {

      })
    },
    // 新增行 职业信息
    newRowIntBankPositionmesage () {
      this.intBankPositionmesageList = this.$util.cloneObject(this.tempIntBankPositionmesageList)
      this.intBankPositionmesageList.push({})
      this.tempIntBankPositionmesageList.push({})
    },
    // 保存信用提示
    saveIntBankCredittips () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankCredittipsForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankCredittipsList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankCredittipsData(data.data)
        }
      }).catch(er => {

      })
    },
    // 保存未结清贷款信息汇总
    saveIntBankNotCredittips () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankNotCredittipsForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankNotCredittipsList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankNotCredittipsData(data.data)
        }
      }).catch(er => {

      })
    },
    // 保存未销户贷记卡信息汇总
    saveIntBankNotPinshouseholds () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankNotPinshouseholdsForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankNotPinshouseholdsList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankNotPinshouseholdsData(data.data)
        }
      }).catch(er => {

      })
    },
    // 保存未销户准贷记卡信息汇总
    saveIntBankNotQuasiCredit () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankNotQuasiCreditForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankNotQuasiCreditList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankNotQuasiCreditData(data.data)
        }
      }).catch(er => {

      })
    },
    // 保存对外担保信息汇总
    saveIntBankGuaranteeCount () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankGuaranteeCountForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankGuaranteeCountList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankGuaranteeCountData(data.data)
        }
      }).catch(er => {

      })
    },
    // 新增行 贷款
    newRowIntBankCreditPaymentNJQ () {
      this.intBankCreditPaymentNJQList.push({})
    },
    // 新增行 贷记卡
    newRowIntBankCreditCardNXhRecord () {
      this.intBankCreditCardNXhRecordList.push({})
    },
    // 新增行 准贷记卡
    newRowIntBankStandardCreditCards () {
      this.intBankStandardCreditCardsList.push({})
    },
    // 保存养老保险金缴存记录
    saveIntBankEndowmentInsurance () {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = this.intBankEndowmentInsuranceForm
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankEndowmentInsuranceList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankEndowmentInsuranceData(data.data)
        }
      }).catch(er => {

      })
    },
    // 保存记录汇总
    saveintBankQuerySummary () {
      var vm = this
      var params = {}
      this.intBankQuerySummaryList = this.$util.cloneObject(this.tempIntBankQuerySummaryList)
      if (this.intBankQuerySummaryList && this.intBankQuerySummaryList[0]) {
        params = this.intBankQuerySummaryList[0]
      }
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankQuerySummaryList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (!params.id || params.id < 1) {
          vm.initIntBankQuerySummaryData(data.data)
        }
      }).catch(er => {

      })
    },
    // 新增行 查询记录
    newRowIntBankQueryDetail () {
      this.intBankQueryDetailList = this.$util.cloneObject(this.tempIntBankQueryDetailList)
      this.intBankQueryDetailList.push({})
      this.tempIntBankQueryDetailList.push({})
    },
    // 保存查询记录
    saveIntBankQueryDetail (rowData) {
      var vm = this
      var params = {}
      params = this.tempIntBankQueryDetailList[rowData.index]
      params.loanId = this.loanId
      params.serialNum = this.loanId
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankQueryDetail', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.initIntBankQueryDetailData(data.data)
      }).catch(er => {

      })
    },
    // 新增行 个人查询记录
    newRowIntBankBanruDetail () {
      this.intBankBanruDetailList = this.$util.cloneObject(this.tempIntBankBanruDetailList)
      this.intBankBanruDetailList.push({})
      this.tempIntBankBanruDetailList.push({})
    },
    // 保存个人查询记录
    saveIntBankBanruDetail (rowData) {
      var vm = this
      var params = {}
      params = this.tempIntBankBanruDetailList[rowData.index]
      params.loanId = this.loanId
      params.serialNum = this.loanId
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankBanruDetail', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.initIntBankBanruDetailData(data.data)
      }).catch(er => {

      })
    },
    // 保存贷款
    saveIntBankCreditPaymentJQ (item, index) {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = item
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankCreditPaymentRecordsList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (data.data && data.data.length > 0) {
          vm.initIntBankCreditPaymentNJQData(data.data)
        }
      }).catch(er => {

      })
    },
    // 删除贷款信息
    deleteIntBankCreditPaymentJQ (item, index) {
      this.intBankCreditPaymentNJQList.splice(index, 1)
    },
    // 保存贷记卡
    saveIntBankCreditCardXhRecord (item, index) {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = item
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankCreditCard', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (data.data && data.data.length > 0) {
          vm.initIntBankCreditCardNXhRecordData(data.data)
        }
      }).catch(er => {

      })
    },
    // 删除贷记卡
    deleteIntBankCreditCardXhRecord (item, index) {
      this.intBankCreditCardNXhRecordList.splice(index, 1)
    },
    // 保存准贷记卡
    saveIntBankStandardCreditCard (item, index) {
      var vm = this
      var params = {}
      // 表单数据赋值
      params = item
      if (!params.id) {
        params.loanId = this.loanId
        params.serialNum = this.loanId
      }
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/saveIntBankStandardCreditCardsList', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        if (data.data && data.data.length > 0) {
          vm.initIntBankStandardCreditCardsData(data.data)
        }
      }).catch(er => {

      })
    },
    // 删除准贷记卡
    deleteIntBankStandardCreditCard (item, index) {
      this.intBankStandardCreditCardsList.splice(index, 1)
    },
    // 初始化个人基本信息
    initIntBankBasicData (data) {
      if (data) {
        this.intBankBasicForm = data
        if (this.intBankBasicForm.applicantBirthDate) {
          this.intBankBasicForm.applicantBirthDate = new Date(data.applicantBirthDate)
        }
        if (this.intBankBasicForm.requestDate) {
          this.intBankBasicForm.requestDate = new Date(data.requestDate)
        }
        if (this.intBankBasicForm.respondDate) {
          this.intBankBasicForm.respondDate = new Date(data.respondDate)
        }
        this.intBankBasicList = [this.intBankBasicForm]
      } else {
        this.intBankBasicList = [{}]
      }
      this.tempIntBankBasicList = this.$util.cloneObject(this.intBankBasicList)
    },
    // 初始化居住信息
    initIntBankDwellmessageData (data) {
      if (data) {
        this.intBankDwellmessageList = data
        this.tempIntBankDwellmessageList = this.$util.cloneObject(this.intBankDwellmessageList)
      }
    },
    // 初始化职业信息
    initIntBankPositionmesageData (data) {
      if (data) {
        this.intBankPositionmesageList = data
        this.tempIntBankPositionmesageList = this.$util.cloneObject(this.intBankPositionmesageList)
      }
    },
    // 初始化信用提示
    initIntBankCredittipsData (data) {
      if (data) {
        this.intBankCredittipsForm = data
        this.intBankCredittipsForm.firstMonth = this.$util.formatDate(data.firstMonth)
        this.intBankCredittipsForm.firstCreditMonth = this.$util.formatDate(data.firstCreditMonth)
        this.intBankCredittipsForm.quasiCreditMonth = this.$util.formatDate(data.quasiCreditMonth)
      }
    },
    // 初始化未结清贷款信息汇总
    initIntBankNotCredittipsData (data) {
      if (data) {
        this.intBankNotCredittipsForm = data
      }
    },
    // 初始化未销户准贷记卡信息汇总
    initIntBankNotQuasiCreditData (data) {
      if (data) {
        this.intBankNotQuasiCreditForm = data
      }
    },
    // 初始化未销户贷记卡信息汇总
    initIntBankNotPinshouseholdsData (data) {
      if (data) {
        this.intBankNotPinshouseholdsForm = data
      }
    },
    // 初始化对外担保信息汇总
    initIntBankGuaranteeCountData (data) {
      if (data) {
        this.intBankGuaranteeCountForm = data
      }
    },
    // 初始化贷款
    initIntBankCreditPaymentJQData (data) {
      if (data) {
        this.intBankCreditPaymentJQList = data
        for (var i = 0; i < this.intBankCreditPaymentJQList.length; i++) {
          this.handleIntBankCreditPaymentJQ(this.intBankCreditPaymentJQList[i])
        }
      }
    },
    handleIntBankCreditPaymentJQ (data) {
      if (data) {
        if (data.loanDate) {
          data.loanDate = new Date(data.loanDate)
        }
        if (data.loanExpire) {
          data.loanExpire = new Date(data.loanExpire)
        }
        if (data.endExpire) {
          data.endExpire = new Date(data.endExpire)
        }
      }
    },
    // 初始化贷款
    initIntBankCreditPaymentNJQData (data) {
      if (data) {
        this.intBankCreditPaymentNJQList = data
        for (var i = 0; i < this.intBankCreditPaymentNJQList.length; i++) {
          var o = this.intBankCreditPaymentNJQList[i]
          if (o.loanDate) {
            o.loanDate = new Date(o.loanDate)
          }
          if (o.loanExpire) {
            o.loanExpire = new Date(o.loanExpire)
          }
          if (o.endExpire) {
            o.endExpire = new Date(o.endExpire)
          }
          if (o.reimbursement) {
            o.reimbursement = new Date(o.reimbursement)
          }
          if (o.recentRepaymentDate) {
            o.recentRepaymentDate = new Date(o.recentRepaymentDate)
          }
        }
      }
    },
    // 初始化贷记卡
    initIntBankCreditCardNXhRecordData (data) {
      if (data) {
        this.intBankCreditCardNXhRecordList = data
        for (var i = 0; i < this.intBankCreditCardNXhRecordList.length; i++) {
          if (this.intBankCreditCardNXhRecordList[i].loanDate) {
            this.intBankCreditCardNXhRecordList[i].loanDate = new Date(this.intBankCreditCardNXhRecordList[i].loanDate)
          }
          if (this.intBankCreditCardNXhRecordList[i].loanExpire) {
            this.intBankCreditCardNXhRecordList[i].loanExpire = new Date(this.intBankCreditCardNXhRecordList[i].loanExpire)
          }
          if (this.intBankCreditCardNXhRecordList[i].reimbursement) {
            this.intBankCreditCardNXhRecordList[i].reimbursement = new Date(this.intBankCreditCardNXhRecordList[i].reimbursement)
          }
          if (this.intBankCreditCardNXhRecordList[i].recentRepaymentDate) {
            this.intBankCreditCardNXhRecordList[i].recentRepaymentDate = new Date(this.intBankCreditCardNXhRecordList[i].recentRepaymentDate)
          }
        }
      }
    },
    // 初始化贷记卡
    initIntBankCreditCardXhRecordData (data) {
      if (data) {
        this.intBankCreditCardXhRecordList = data
        for (var i = 0; i < this.intBankCreditCardXhRecordList.length; i++) {
          if (this.intBankCreditCardXhRecordList[i].loanDate) {
            this.intBankCreditCardXhRecordList[i].loanDate = new Date(this.intBankCreditCardXhRecordList[i].loanDate)
          }
          if (this.intBankCreditCardXhRecordList[i].loanExpire) {
            this.intBankCreditCardXhRecordList[i].loanExpire = new Date(this.intBankCreditCardXhRecordList[i].loanExpire)
          }
        }
      }
    },
    // 初始化准贷记卡
    initIntBankStandardCreditCardsData (data) {
      if (data) {
        this.intBankStandardCreditCardsList = data
        for (var i = 0; i < this.intBankStandardCreditCardsList.length; i++) {
          if (this.intBankStandardCreditCardsList[i].loanDate) {
            this.intBankStandardCreditCardsList[i].loanDate = new Date(this.intBankStandardCreditCardsList[i].loanDate)
          }
          if (this.intBankStandardCreditCardsList[i].loanExpire) {
            this.intBankStandardCreditCardsList[i].loanExpire = new Date(this.intBankStandardCreditCardsList[i].loanExpire)
          }
          if (this.intBankStandardCreditCardsList[i].reimbursement) {
            this.intBankStandardCreditCardsList[i].reimbursement = new Date(this.intBankStandardCreditCardsList[i].reimbursement)
          }
          if (this.intBankStandardCreditCardsList[i].recentRepaymentDate) {
            this.intBankStandardCreditCardsList[i].recentRepaymentDate = new Date(this.intBankStandardCreditCardsList[i].recentRepaymentDate)
          }
        }
      }
    },
    // 初始化养老保险金缴存记录
    initIntBankEndowmentInsuranceData (data) {
      if (data) {
        this.intBankEndowmentInsuranceForm = data
        if (this.intBankEndowmentInsuranceForm.loanDate) {
          this.intBankEndowmentInsuranceForm.loanDate = new Date(this.intBankEndowmentInsuranceForm.loanDate)
        }
        if (this.intBankEndowmentInsuranceForm.reimbursement) {
          this.intBankEndowmentInsuranceForm.reimbursement = new Date(this.intBankEndowmentInsuranceForm.reimbursement)
        }
        if (this.intBankEndowmentInsuranceForm.updateDate) {
          this.intBankEndowmentInsuranceForm.updateDate = new Date(this.intBankEndowmentInsuranceForm.updateDate)
        }
      }
    },
    // 初始化查询记录汇总
    initIntBankQuerySummaryData (data) {
      if (data) {
        this.intBankQuerySummaryList = [data]
      } else {
        this.intBankQuerySummaryList = [{}]
      }
      this.tempIntBankQuerySummaryList = this.$util.cloneObject(this.intBankQuerySummaryList)
    },
    // 初始化查询记录
    initIntBankQueryDetailData (data) {
      if (data) {
        this.intBankQueryDetailList = data
        this.tempIntBankQueryDetailList = this.$util.cloneObject(this.intBankQueryDetailList)
      }
    },
    // 初始化个人查询记录
    initIntBankBanruDetailData (data) {
      if (data) {
        this.intBankBanruDetailList = data
        this.tempIntBankBanruDetailList = this.$util.cloneObject(this.intBankBanruDetailList)
      }
    },
    initMediaData (data) {
      var list = []
      var YDList = []
      var custList = []
      if (data && data.length > 0) {
        var baseSrc = this.baseUrl + 'approve/credit/intbank/service/loadAttachmentById/'
        for (var i = 0; i < data.length; i++) {
          var viewAttach = {}
          viewAttach.label = data[i].atmtTypeName
          var attachmentList = data[i].laAttachmentDTOList
          var viewList = []
          if (attachmentList && attachmentList.length > 0) {
            for (var j = 0; j < attachmentList.length; j++) {
              let label = attachmentTypeData[attachmentList[j].atmtType] + '_' + (j + 1)
              if ((attachmentList[j].atmtType === 'A' || attachmentList[j].atmtType === 'YH') && attachmentList[j].fileName !== '' && attachmentList[j].fileName !== null) {
                label = attachmentList[j].fileName
              }
              let fileLocation = attachmentList[j].fileLocation
              if (!fileLocation) fileLocation = ''
              let fileName = attachmentList[j].fileName
              if (!fileName) fileName = ''
              viewList.push({
                label: label,
                src: baseSrc + attachmentList[j].id,
                type: fileLocation.substring(fileLocation.lastIndexOf('.') + 1),
                fileType: attachmentList[j].atmtType,
                url: fileLocation
              })
            }
            viewAttach.children = viewList
            list.push(viewAttach)
            if (data[i].atmtType === 'B') {
              custList.push(viewAttach)
            } else if (data[i].atmtType === 'PDF_B') {
              YDList.push(viewAttach)
            }
          }
        }
      }
      this.viewerData = list
      this.custData = custList
      this.YDData = YDList
    },
    //  custData: [],
    //   YDData: [],
    // 返回
    goBack () {
      var vm = this
      vm.$router.push(
        { path: 'credit-report-check/creReportApprove',
          name: 'creReportApprove',
          query: {}
        }
      )
    },
    cancel () {
      var vm = this
      vm.reasonTurnOut = false
    },
    // 附件对比
    compare () {
      var vm = this
      vm.turnOut = true
    },
    refuse () {
      var vm = this
      vm.reasonTurnOut = true
    },
    hold () {
      var vm = this
      var reason = vm.refuseReason
      if (reason.trim() === '') {
        this.$Message.warning('拒绝原因不能为空')
        return
      }
      var param = {
        loanId: vm.loanId,
        refuseReason: reason
      }

      var url = this.baseUrl + 'approve/credit/intbank/service/refuseAudit'
      this.$ajax.post(url, param).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          this.$Message.warning(message)
          return
        }
        this.$Message.success(message)
        vm.$router.back()
      }).catch(er => {

      })
    },
    // 获取评分
    submitScore () {
      var vm = this
      vm.$Modal.confirm({
        title: '提示',

        content: '请确认已经对比征信报告，提交后不能拒绝?',

        okText: '确定',

        cancelText: '取消',
        onOk: () => {
          var url = this.baseUrl + 'approve/credit/intbank/service/getScore/' + this.loanId
          this.$ajax.post(url).then(re => {
            var data = re.data
            var code = data.code
            var message = data.message
            if (code !== 'success') {
              this.$Message.warning(message)
              return
            }
            this.$Message.success(message)
            vm.$router.back()
          }).catch(er => {

          })
        }
      })
    },
    // 页面加载初始化数据
    initCreditReportData () {
      var vm = this
      var params = {}
      params.loanId = this.loanId
      this.$ajax.post(this.baseUrl + 'approve/credit/intbank/service/checktheCreditReport', params).then(re => {
        var data = re.data
        var code = data.code
        var message = data.message
        if (code !== 'success') {
          vm.$Message.warning(message)
          return
        }
        // 个人基本信息
        vm.initIntBankBasicData(data.data.intBankBasic)
        // 居住信息
        vm.initIntBankDwellmessageData(data.data.intBankDwellmessageList)
        // 职业信息
        vm.initIntBankPositionmesageData(data.data.intBankPositionmesageList)
        // 信用提示
        vm.initIntBankCredittipsData(data.data.intBankCredittips)
        // 未结清贷款信息汇总
        vm.initIntBankNotCredittipsData(data.data.intBankNotCredittips)
        // 未销户贷记卡信息汇总
        vm.initIntBankNotPinshouseholdsData(data.data.intBankNotPinshouseholds)
        // 未销户准贷记卡信息汇总
        vm.initIntBankNotQuasiCreditData(data.data.intBankNotQuasiCredit)
        // 对外担保信息汇总
        vm.initIntBankGuaranteeCountData(data.data.intBankGuaranteeCount)
        // 贷款
        vm.initIntBankCreditPaymentJQData(data.data.intBankCreditPaymentJQList)
        // 贷款
        vm.initIntBankCreditPaymentNJQData(data.data.intBankCreditPaymentNJQList)
        // 贷记卡
        vm.initIntBankCreditCardNXhRecordData(data.data.intBankCreditCardNXhRecordList)
        // 贷记卡
        vm.initIntBankCreditCardXhRecordData(data.data.intBankCreditCardXhRecordList)
        // 准贷记卡
        vm.initIntBankStandardCreditCardsData(data.data.intBankStandardCreditCardsList)
        // 养老保险金缴存记录
        vm.initIntBankEndowmentInsuranceData(data.data.intBankEndowmentInsurance)
        // 查询记录汇总
        vm.initIntBankQuerySummaryData(data.data.intBankQuerySummary)
        // 查询记录
        vm.initIntBankQueryDetailData(data.data.intBankQueryDetailList)
        // 个人查询记录
        vm.initIntBankBanruDetailData(data.data.intBankBanruDetailList)
        // 附件
        vm.initMediaData(data.data.mediaList)
      }).catch(er => {

      })
    }
  },
  computed: {

  },
  mounted () {

  },
  created () {
    this.$ajax = this.$util.ajax()
    this.loanId = this.$route.query.loanId
    this.initCreditReportData()
  },
  watch: {

  },
  props: {

  }
}
</script>
<style scoped>
.ivu-col-span-12 {
  height: 700px;
}
.ivu-modal-fullscreen-no-footer .ivu-modal-body {
  height: 850px;
}
/* .ivu-modal-content {
  height:900px !important;
} */
#refuseModal {
  height: 400px !important
}
#refuseModal .ivu-modal-content {
  height: 270px !important
}
</style>
